import request from '@/utils/request'

// 查询fitness列表
export function listFitness(query) {
  return request({
    url: '/fitness/record/list',
    method: 'get',
    params: query
  })
}

// 查询fitness列表-日历形式
export function listCalendarFitness(query) {
  return request({
    url: '/fitness/record/listCalendar',
    method: 'get',
    params: query
  })
}

// 查询fitness列表-表格形式
export function listTableFitness(query) {
  return request({
    url: '/fitness/record/listTable',
    method: 'get',
    params: query
  })
}

// 查询fitness详细
export function getFitness(id) {
  return request({
    url: '/fitness/record/' + id,
    method: 'get'
  })
}

// 新增fitness
export function addFitness(data) {
  return request({
    url: '/fitness/record',
    method: 'post',
    data: data
  })
}

// 修改fitness
export function updateFitness(data) {
  return request({
    url: '/fitness/record',
    method: 'put',
    data: data
  })
}

// 删除fitness
export function delFitness(id) {
  return request({
    url: '/fitness/record/' + id,
    method: 'delete'
  })
}

// 修改fitness状态
export function updateFitnessStatus(data) {
  return request({
    url: '/fitness/record/updateStatus',
    method: 'put',
    data: data
  })
}